<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../vue.js"></script>
    <link rel="stylesheet" type="text/css" href="animate.css"/>
    <style>
        @keyframes bounce-in {
            0%{
                transform:scale(0);
            }
            50%{
                transform:scale(1.5);
            }
            100%{
                transform:scale(1);
            }
        }
        .active{
            transform-origin:left center;
            animation:bounce-in 1s;
        }
        .leave{
            transform-origin:left center;
            animation:bounce-in 1s reverse;
        }
    </style>
</head>
<body>
<div id="app">
    <!--动画标签-->
    <transition name="fade"
                enter-active-class="animated swing"
                leave-active-class="animated shake">
        <div v-show="show">hello world</div>
    </transition>
    <button @click="handleClick">切换</button>
</div>

<script>
    var vm = new Vue({
        el: "#app",
        data: {
            show:true
        },
        methods:{
            handleClick: function () {
                this.show=!this.show
            }
        }
    })
</script>
</body>
</html>